package com.source.utils;

import lombok.Getter;

/**
 * @author Iceberg777
 * 返回结果枚举类
 */

@Getter
public enum ResultEnum {

    /**
     * 返回结果枚举，每个枚举代表着一个状态
     */
    SUCCESS(2000, "操作成功！"),
    ERROR(2001, "操作失败！"),
    DATA_NOT_FOUND(3001, "查询失败！"),

    PARAMS_NULL(3002, "参数不能为空！"),

    PARAMS_ERROR(3003, "参数不合法！"),

    NOT_LOGIN(4000, "当前账号未登录！"),

    NO_ACCESS(4001,"您无权访问!");

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
